package com.tjn;

import java.sql.SQLOutput;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;

/**
 * @author 陶镓妮
 * @version 1.0
 */
public class Exercise03 {
    @SuppressWarnings("all")
    public static void main(String[] args) {
        HashMap map = new HashMap();
        map.put("jack",650);
        map.put("tom",1200);
        map.put("smith",2900);

        map.put("jack",2600);
        System.out.println(map);

        Set set = map.keySet();
        for (Object key : set) {
            map.put(key, (Integer)map.get(key) + 100);
        }
        System.out.println(map);

        for (Object o : set)  {
            System.out.println(o);
        }
        Collection values = map.values();
        for (Object o : values)  {
            System.out.println(o);
        }
    }
}
